const mongoose = require('mongoose')
const Schema = mongoose.Schema

const schema = new Schema({
  name: {type: String}, // 名字
  avatar: {type: String}, // 头像
  title: {type: String},  // 称号
  categories: [{type: Schema.Types.ObjectId,ref: 'Category'}],//所属类别
  scores: {
    difficult: {type: Number},
    skills: {type: Number},
    attack: {type: Number},
    survive: {type: Number},
  }, // 得分
  skills: [{
    icon: {type:String},
    name: {type:String},
    description: {type:String},
    tips: {type:String},
  }],// 技能
  downWind: [{type: Schema.Types.ObjectId, ref: 'Item'}], //顺风出装
  upWind: [{type: Schema.Types.ObjectId, ref: 'Item'}], //逆风出装
  usageTips: {type:String},//使用技巧
  battleTips: {type:String},//战斗技巧
  teamTips: {type:String},//团战思路
  partners: [{
    hero: {type: Schema.Types.ObjectId,ref: 'Hero'},
    description: {type: String},
  }], //英雄关系
})

module.exports = mongoose.model('Hero', schema)
